﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Administrator/EHTAdmin.Master" AutoEventWireup="true" CodeBehind="EHTArticle.aspx.cs" Inherits="EHTWebsiteProject.Administrator.EHTArticle" %>
<%@ Register src="Controls/PaggingControl.ascx" tagname="PaggingControl" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MenuModulContent" runat="server">
    <div class="MenuSub-Left" >
        <table>
            <tr>
                <td> <img alt="" src="../images/EHTgiaodien/icon-48-article.png" /></td>
                <td><asp:Label ID="lbArticle" runat="server" Text="Quản lý bài viết" ></asp:Label></td>
            </tr>
        </table>           
    </div>
    <div class="MenuSub-Right" align="right">
        <table style="height:60px">
            <tr>                
                <td valign="middle">
                    <div class="add-edit-del">  
                            <asp:ImageButton ID="ImaTat" 
                                ImageUrl="~/images/EHTgiaodien/icon-32-unpublish.png" runat="server" 
                                width="32px" height="32px" class="imagboder" onclick="ImaTat_Click"  />                     
                            <br />
                            <asp:Label ID="lbTat" runat="server" Text="Tắt"></asp:Label>                       
                    </div>
                </td>
                <td valign="middle">
                    <div class="add-edit-del">   
                            <asp:ImageButton ID="ImgBat" 
                                ImageUrl="~/images/EHTgiaodien/icon-32-publish.png" runat="server" width="32px" 
                                height="32px" class="imagboder" onclick="ImgBat_Click"  />                     
                            <br />                                                 
                            <asp:Label ID="lbBat" runat="server" Text="Bật"></asp:Label>                       
                    </div>
                </td>                                             
                <td valign="middle">
                    <div class="add-edit-del">
                         <asp:ImageButton ID="ImgDel" ImageUrl="~/images/EHTgiaodien/icon-32-delete.png" 
                                runat="server" width="32px" height="32px" CssClass="imagboder" 
                                OnClientClick="return confirm('Are you sure you want to delete?');" 
                             onclick="ImgDel_Click" />                                                     
                            <br />
                            <asp:Label ID="lbDel" runat="server" Text="Xóa"></asp:Label>       
                    </div>
                </td>

                <td valign="middle">
                    <div class="add-edit-del">
                         <asp:ImageButton ID="ImgEdit" ImageUrl="~/images/EHTgiaodien/icon-32-edit.png" 
                                runat="server" width="32px" height="32px" CssClass="imagboder" onclick="ImgEdit_Click" 
                                />  <br />                                                                      
                            <asp:Label ID="lbEdit" runat="server" Text="Sửa"></asp:Label> 
                    </div>
                </td>
                <td valign="middle">
                    <div class="add-edit-del">
                        <a href="EHTArticleIU.aspx">
                            <img alt="" src="../images/EHTgiaodien/icon-32-new.png" width="32px" height="32px" class="imagboder" /><br />
                            <asp:Label ID="lbAddNew" runat="server" Text="Thêm mới"></asp:Label>
                        </a>
                    </div>
                </td>
                 <td valign="middle">
                    <div class="add-edit-del">
                         <asp:ImageButton ID="imgConfig" ImageUrl="~/images/EHTgiaodien/icon-32-config.png" 
                                runat="server" width="32px" height="32px" CssClass="imagboder" onclick="imgConfig_Click" 
                                />  <br />                                                                      
                            <asp:Label ID="lbCauHinh" runat="server" Text="Cấu hình"></asp:Label>                        
                    </div>
                </td>
                 <td valign="middle">
                    <div class="add-edit-del">
                        <a href="#">
                            <img alt="" src="../images/EHTgiaodien/icon-32-help.png" width="32px" height="32px" class="imagboder" /><br />
                            <asp:Label ID="lbHelp" runat="server" Text="Trợ giúp"></asp:Label>
                        </a>
                    </div>
                </td>                
            </tr>
        </table>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentMain" runat="server">

     <div style="padding:0px 0px 0px 0px" align="right">
        <table>
            <tr>
               
                <td>
                    <asp:DropDownList ID="ddlDanhmucSanPham" runat="server" CssClass="InputText" 
                        Width="250px" AutoPostBack="true" 
                        onselectedindexchanged="ddlDanhmucSanPham_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
                 <td>
                    <asp:TextBox ID="txtsearch" runat="server" CssClass="InputText" Width="150px"></asp:TextBox> 
                &nbsp;</td>
                <td>
                    <asp:ImageButton ID="ImagSearch" runat="server" 
                        ImageUrl="~/images/EHTgiaodien/icon-16-orphan.png" Width="20px" Height="20px" 
                        onclick="ImagSearch_Click"/>
                &nbsp;&nbsp;&nbsp;
                </td>
            </tr>
        </table>
    </div>
    <asp:Literal ID="ltrErorr" runat="server"></asp:Literal>
    <div style="padding-top:5px;">
        <asp:Panel ID="pnTinTuc" runat="server">
             <asp:Repeater ID="rpNews" runat="server" 
            onitemdatabound="rpNews_ItemDataBound" >                
        <HeaderTemplate>
            <table ID="table" border="0" cellpadding="0" cellspacing="0" >
                 <thead>
                    <tr>
                                     <th>
                                        <asp:CheckBox ID="ckAll" runat="server" AutoPostBack="true" OnCheckedChanged="CheckAll" />
                                    </th>                        
                                   
                                    <th>
                                        <asp:Label ID="lbID" runat="server" Text="STT"></asp:Label>
                                    </th>
                                    <th>
                                        <asp:Label ID="lbTieuDeVN" runat="server" Text=" Tiêu đề"></asp:Label>                            
                                    </th>
                                    <th>
                                        <asp:Label ID="lbTomTatVN" runat="server" Text=" Tóm tắt "></asp:Label>                             
                                    </th>
                                    <th>
                                        <asp:Label ID="lbHinhAnhUrl" runat="server" Text=" Hình ảnh "></asp:Label>                             
                                    </th>                                        
                                    <th>
                                        <asp:Label ID="lbPublish" runat="server" Text=" Trạng thái "></asp:Label>                             
                                    </th>                                                                                
                    </tr>
                 </thead>
                 <tbody>            
        </HeaderTemplate>
        <ItemTemplate>
                 <tr>
                        <td>
                            <asp:CheckBox ID="ckMenu"  runat="server" />
                            <asp:Label ID="lbDelID" runat="server" Visible="false" Text='<%#Eval("TinTucID")%>'></asp:Label>
                        </td>
                        <td>
                            <%#Eval("IndexId") %>
                        </td>                        
                                <td style="width:300px">
                                    <a class="a" href='EHTArticleIU.aspx?TinTucID=<%#Eval("TinTucID") %>'>
                                        <%#Eval("TieuDeVN")%>
                                    </a>
                                </td>
                                <td style="width:500px">
                                    <%#Eval("TomTatVN")%>
                                </td>                                                                                                 
                                <td>
                                   <img  alt="" src='../ImageDatas/News/<%#Eval("HinhAnhUrl")%>' width="80px" height="60px"/>
                                </td>                                
                                <td>
                                     <asp:Label ID="lbStatus" runat="server" Text='<%#Eval("TrangThai")%>' Visible="false"></asp:Label>
                                     <asp:Image ID="ImagStatus" ImageUrl="~/images/tick.png" runat="server" />
                                </td>
                                     
                    </tr>
        </ItemTemplate>
        <FooterTemplate>
                </tbody>
             </table>
        </FooterTemplate>
    </asp:Repeater>
        </asp:Panel>
        
        <asp:Panel ID="pnTinTucOther" runat="server">
            <asp:Repeater ID="rpNewsOther" runat="server" 
            onitemdatabound="rpNewsOther_ItemDataBound" >                
        <HeaderTemplate>
            <table ID="table" border="0" cellpadding="0" cellspacing="0" >
                 <thead>
                    <tr>
                                     <th>
                                        <asp:CheckBox ID="ckAll" runat="server" AutoPostBack="true" OnCheckedChanged="CheckAll" />
                                    </th>                        
                                   
                                    <th>
                                        <asp:Label ID="lbID" runat="server" Text="STT"></asp:Label>
                                    </th>
                                    <th>
                                        <asp:Label ID="lbTieuDeVN" runat="server" Text=" Title"></asp:Label>                            
                                    </th>
                                    <th>
                                        <asp:Label ID="lbTomTatVN" runat="server" Text=" Summary "></asp:Label>                             
                                    </th>
                                    <th>
                                        <asp:Label ID="lbHinhAnhUrl" runat="server" Text=" Image "></asp:Label>                             
                                    </th>                                        
                                    <th>
                                        <asp:Label ID="lbPublish" runat="server" Text=" Status "></asp:Label>                             
                                    </th>                                                                                
                    </tr>
                 </thead>
                 <tbody>            
        </HeaderTemplate>
        <ItemTemplate>
                 <tr>
                        <td>
                            <asp:CheckBox ID="ckMenu"  runat="server" />
                            <asp:Label ID="lbDelID" runat="server" Visible="false" Text='<%#Eval("TinTucID")%>'></asp:Label>
                        </td>
                        <td>
                            <%#Eval("IndexId") %>
                        </td>                        
                                <td style="width:300px">
                                    <a class="a" href='EHTArticleIU.aspx?TinTucID=<%#Eval("TinTucID") %>'>
                                        <%#Eval("TieuDeOther")%>
                                    </a>
                                </td>
                                <td style="width:500px">
                                    <%#Eval("TomTatOther")%>
                                </td>                                                                                                 
                                <td>
                                   <img  alt="" src='../ImageDatas/News/<%#Eval("HinhAnhUrl")%>' width="80px" height="60px"/>
                                </td>                                
                                <td>
                                     <asp:Label ID="lbStatus" runat="server" Text='<%#Eval("TrangThai")%>' Visible="false"></asp:Label>
                                     <asp:Image ID="ImagStatus" ImageUrl="~/images/tick.png" runat="server" />
                                </td>
                                     
                    </tr>
        </ItemTemplate>
        <FooterTemplate>
                </tbody>
             </table>
        </FooterTemplate>
    </asp:Repeater>
        </asp:Panel>
    </div> 
    <div align="center" style="padding:10px 0px 10px 0px">
        
        <table>
            <tr>
                <td valign="top">
                    <asp:Label ID="lbHienThi" runat="server" Text="Hiển thị" ></asp:Label>
                    <asp:DropDownList ID="ddlSize" runat="server" AutoPostBack="true" 
                        onselectedindexchanged="ddlSize_SelectedIndexChanged">
                        <asp:ListItem Value="5" Text="5"></asp:ListItem>
                        <asp:ListItem Value="10" Text="10"></asp:ListItem>
                        <asp:ListItem Value="20" Text="20"></asp:ListItem>
                        <asp:ListItem Value="30" Text="30"></asp:ListItem>
                        <asp:ListItem Value="50" Text="50"></asp:ListItem>
                        <asp:ListItem Value="100" Text="100"></asp:ListItem>
                        <asp:ListItem Value="-1" Text="all"></asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>
                    <uc1:PaggingControl ID="PaggingControl1" PageSize="30" runat="server" />
                </td>
            </tr>
        </table>
        
    </div>  
</asp:Content>
